<?php

    // TITLE: nav
    // FILE: nav.php
    // AUTHOR: dantira
    // CREATED: Jan 27, 2015, 10:12:01 PM

?>
<nav id="mainNav">
    <img style="margin-bottom: 15px;" src="img/habitat_logo2.jpg" alt="Habitat For Humanity Logo" />
    <ul class="navList">
<?php

    // HOME
    $thisSection = ($dir == 'home');
    $selected = ($thisSection) ? 'class="selected"' : '';
    echo '<li ' .$selected . '><a href="index.php?dir=home" ' . $selected . '>Home</a></li>';

    /*
    // ACCOUNT
    $thisSection = ($dir == 'account');
    $selected = ($thisSection) ? 'class="selected"' : '';
    echo '<li ' .$selected . '><a href="index.php?dir=account" ' . $selected . '>Account</a></li>';
    if ($thisSection) {require 'root/subNav.php';}
    */
    
    // ADMIN
    if ($isAdmin) {
	$thisSection = ($dir == 'admin');
	$selected = ($thisSection) ? 'class="selected"' : '';
	echo '<li ' .$selected . '><a href="index.php?dir=admin"'. $selected . '>Admin</a></li>';
	if ($thisSection) {require 'root/subNav.php';}
    }// end if

    // OFFICE
    if ($isOffice) {
	$thisSection = ($dir == 'office');
	$selected = ($thisSection) ? 'class="selected"' : '';
	echo '<li ' .$selected . '><a href="index.php?dir=office" ' . $selected . '>Office</a></li>';
	if ($thisSection) {require 'root/subNav.php';}
	//echo '<hr>';	
    }// end if

    /*
    // DONOR
    if ($isDonor) {
	$thisSection = ($dir == 'donor');
	$selected = ($thisSection) ? 'class="active"' : '';
	echo '<li ' .$selected . '><a href="index.php?dir=donor" ' . $selected . '>Donor</a></li>';
	if ($thisSection) {require 'root/subNav.php';}
    }// end if
    */

    // HOMEOWNER
    if ($isHomeowner) {
	$thisSection = ($dir == 'ho');
	$selected = ($thisSection) ? 'class="selected"' : '';
	echo '<li ' .$selected . '><a href="index.php?dir=ho" ' . $selected . '>Homeowner</a></li>';
	if ($thisSection) {require 'root/subNav.php';}
    }// end if

    // VOLUNTEER
    if ($isVolunteer) {
	$thisSection = ($dir == 'volunteer');
	$selected = ($thisSection) ? 'class="selected"' : '';
	echo '<li ' .$selected . '><a href="index.php?dir=volunteer" ' . $selected . '>Volunteer</a></li>';
	if ($thisSection) {require 'root/subNav.php';}
    }// end if

    $thisSection = ($dir == 'about');
    $selected = ($thisSection) ? 'class="selected"' : '';
    echo '<li ' .$selected . '><a href="index.php?dir=about" ' . $selected . '>About</a></li>';
    if ($thisSection) {require 'root/subNav.php';}
    
?>
    </ul>

</nav>